<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>Yogette's Registration Form</title>
        <link type="text/css" href="<?php echo base_url(); ?>/yogette/css/jquery-ui-1.8.16.custom.css" rel="Stylesheet" />
        <script type="text/javascript" src="<?php echo base_url(); ?>/yogette/js/jquery-1.6.4.js"></script>	
        <script type="text/javascript" src="<?php echo base_url(); ?>/yogette/js/jquery-ui-1.8.16.custom.min.js"></script>
         <script type="text/javascript"> 
    $(function() {$('#fDate').datepicker({dateFormat: 'mm/dd/yy', altField: '#dbdatepicker', altFormat: 'yy-mm-dd'});
});
         </script>
         <link href="<?php echo base_url(); ?>/yogette/css/yogette.css" rel="stylesheet" type="text/css"/>
       
           
    </head>
    <body class="body-user" >
        <div class="main-wrapper-reg" style="position: relative">
            <img class="pinkcircle" src="<?php echo base_url(); ?>yogette/images/pinkCircle.jpg" />
            <div class="Container"></div>
            <div class="menulist">
                <ul class="menulist-ul">
                    <li><img class="ice-cream" src="<?php echo base_url(); ?>yogette/images/logoIcon.jpg"/><a href="../"><img src="<?php echo base_url(); ?>yogette/images/home.jpg" class="home" alt="Yogette's Homepage"/></a></li>
                </ul>
            </div>
            <div class="reg-form" >

                <h1>Registration Form<span class="important-field-desc"><br/>(*)Means the field is Mandatory</span></h1>
                <!-- First will open a form to the register_user function to post the inputs -->
                <!-- define all required variables for inputs -->
                <?php
                echo form_open(base_url() . 'yogette/user/register_user');
                $username = array(
                    'name' => 'username',
                    'id' => 'username',
                    'value' => set_value('username')
                );
                $first_name = array(
                    'name' => 'first_name',
                    'id' => 'first_name',
                    'value' => set_value('first_name')
                );
                $last_name = array(
                    'name' => 'last_name',
                    'id' => 'last_name',
                    'value' => set_value('last_name')
                );
                $fDate= array(
                    'name' => 'fDate',
                    'id' => 'fDate',
                    'value' => set_value('fDate')
                );
                
                $dbdatepicker= array(
                    'name' => 'dbdatepicker',
                    'id' => 'dbdatepicker',
                    'value' => set_value('dbdatepicker')
                );
                
                $email = array(
                    'name' => 'email',
                    'id' => 'email',
                    'value' => set_value('email')
                );
                $password = array(
                    'name' => 'password',
                    'id' => 'password',
                    'value' => ''
                );
                $password_confirm = array(
                    'name' => 'password_confirm',
                    'id' => 'password_confirm',
                    'value' => ''
                );
                
                $shipaddress = array(
                    'name' => 'shipaddress',
                    'id' => 'shipaddress',
                    'value' => set_value('shipaddress')
                );
                $billaddress = array(
                    'name' => 'billaddress',
                    'id' => 'billaddress',
                    'value' => set_value('billaddress')
                );
                $countryname = array(
                    'name' => 'countryname',
                    'id' => 'countryname',
                    'value' => set_value('countryname')
                );
                $credit_card_type = array(
                    'MasterCard' => "Master Card",
                    'VISA' => "VISA",
                    'AmericanExpress' => "American Express Card",
                    'DinersClub' => "Diners Club",
                    'Discover' => "Discover",
                    'JCB' => "JCB"
                );
                $credit_card_number = array(
                    'name' => "credit_card_number",
                    'id' => "credit_card_number",
                    'value' => set_value('')
                );
                $credit_card_month = array(
                    '01' => "01",
                    '02' => "02",
                    '03' => "03",
                    '04' => "04",
                    '05' => "05",
                    '06' => "06",
                    '07' => "07",
                    '08' => "08",
                    '09' => "09",
                    '10' => "10",
                    '11' => "11",
                    '12' => "12",
                );
                $credit_card_year = array(
                    '11' => "11",
                    '12' => "12",
                    '13' => "13",
                    '14' => "14",
                    '15' => "15",
                    '16' => "16",
                    '17' => "17",
                    '18' => "18",
                    '19' => "19",
                    '20' => "20",
                    '21' => "21",
                    '22' => "22",
                );
                $credit_card_cvv = array(
                    'name' => "credit_card_cvv",
                    'id' => "credit_card_cvv",
                    'value' => set_value('')
                );
                $paypal = array(
                    'name' => 'paypal',
                    'id' => 'paypal',
                    'value' => set_value('paypal')
                );
                
                ?>
                <!-- Get all required inputs to the form -->
                <!-- submit these variables to the form and close it to be processed-->
                <ul class="login_form-ul">
                    <li>
                        <label>Username<span class="important-field">*</span></label>
                        <div>
                            <?php echo form_input($username); ?>
                        </div>
                    </li>
                    <li>
                        <label>First name<span class="important-field">*</span></label>
                        <div>
                            <?php echo form_input($first_name); ?>
                        </div>
                    </li>
                    <li>
                        <label>Last name<span class="important-field">*</span></label>
                        <div>
                            <?php echo form_input($last_name); ?>
                        </div>
                    </li>
                    <li>
                         <label>Data Of Birth<span class="important-field">*</span></label>
                         <div>
                             
                             <input type="text" id="fDate"/>
                             <input type="hidden" id="dbdatepicker" name="dob"/>
                        </div>
                    </li>
                    <li>
                        <label>email<span class="important-field">*</span></label>
                        <div>
                            <?php echo form_input($email); ?>
                        </div>
                    </li>    
                    <li>
                        <label>Password<span class="important-field">*</span></label>
                        <div>
                            <?php echo form_password($password); ?>
                        </div>
                    </li>
                    <li>
                        <label>Confirm Password<span class="important-field">*</span></label>
                        <div>
                            <?php echo form_password($password_confirm); ?>
                        </div>
                    </li>
                    <li>
                        <label>Shipping Address<span class="important-field">*</span></label>
                        <div>
                            <?php echo form_input($shipaddress); ?>
                        </div>
                    </li>
                    <li>
                        <label>Billing Address<span class="important-field">*</span></label>
                        <div>
                            <?php echo form_input($billaddress); ?>
                        </div>
                    </li>
                    <li>
                        <label>Country<span class="important-field">*</span></label>
                        <div>
                            <select name="countryname">
                            <option value="">Select Country</option>
                                <?php foreach ($array as $row):?>    
                            <option value="<?php echo $row['name'];?>">
                                <?php echo $countryname = $row['name'];?>
                            </option>
                                <?php endforeach;?>
                            </select>

                             <?php form_hidden('country_name', $countryname); ?>
                        
                        </div>
                    </li>
                    <li>
                        <label>Credit Card Type<span class="important-field">*</span></label>
                        <div>
                            <?php echo form_dropdown('credit_card_type', $credit_card_type, 'Select Credit Type'); ?>
                        </div>
                    </li>
                    <li>
                        <label>Credit Card Number<span class="important-field">*</span></label>
                        <div>
                            <?php echo form_input($credit_card_number); ?>
                        </div>
                    </li>
                    <li>
                        <label>Credit Card Month<span class="important-field">*</span></label>
                        <?php echo form_dropdown('credit_card_month', $credit_card_month, '01'); ?>
                        <label>Credit Card Year<span class="important-field">*</span></label>
                        <?php echo form_dropdown('credit_card_year', $credit_card_year, '11'); ?>
                    </li>
                    <li>
                        <label title="This is the 3 digits number found in the backsie of your CreditCard">CVV/Code<span class="important-field">*</span></label>
                        <div>
                            <?php echo form_input($credit_card_cvv); ?>
                        </div>
                    </li>
                    <li>
                        <label>PayPal<span class="important-field"></span></label>
                        <div>
                            <?php echo form_input($paypal); ?>
                        </div>
                    </li>
                    <!--<li>
                        <label>Choose Movies Membership Type</label>
                        <div>
                            <?php //echo form_radio('movies_membership', '2@Atime') . "2 DVD's At a time"; ?>
                        </div>
                        <div>
                            <?php //echo form_radio('movies_membership', '3@Atime') . "3 DVD's At a time"; ?>
                        </div>
                        <div>
                            <?php //echo form_radio('movies_membership', 'none') . "None"; ?>
                        </div>
                    </li> 
                    <li>
                        <label>Choose Games Membership Type</label>
                        <div>
                            <?php //echo form_radio('games_membership', '2@Atime') . "2 DVD's At a time"; ?>
                        </div>
                        <div>
                            <?php //echo form_radio('games_membership', '3@Atime') . "3 DVD's At a time"; ?>
                        </div>
                        <div>
                            <?php //echo form_radio('games_membership', 'none') . "None"; ?>
                        </div>
                    </li>    --> 
                    <!--<?php// echo $movies_membership['value']; ?>-->
                    <li>
                        <div>
                            <?php echo validation_errors(); ?>
                        </div>    
                    </li>
                    <li>
                        <?php echo form_submit(array('name' => 'submit'), 'Submit'); ?>
                    </li>
                </ul>
                <?php echo form_close(); ?>
            </div>
        </div>
            <!-- footer start-->
            <div class="pre-footer">   
            </div>
            <div class="footer">
                <div>
                    <p class="footer-p1">yogurt is healthy</p>
                </div>
                <div>
                    <p class="footer-p2">Copyright &COPY; 2010 YOGETTE.</p>
                </div>
            </div>
            <img class="post-footer" src="<?php echo base_url(); ?>yogette/blank.jpg" id="blank" name="blank" /> 
            <!-- footer ends-->

    </body>
</html>